home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / hplip / ui / setupmanualfind.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-04-29  |  2.2 KB  |  47 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. from base.g import *
  5. from qt import *
  6. from setupmanualfind_base import SetupManualFind_base
  7.  
  8. class SetupManualFind(SetupManualFind_base):
  9.     
  10.     def __init__(self, bus, parent = None, name = None, modal = 0, fl = 0):
  11.         SetupManualFind_base.__init__(self, parent, name, modal, fl)
  12.         self.bus = bus
  13.         self.param = ''
  14.         if self.bus == 'net':
  15.             self.findHeadingText.setText(self._SetupManualFind__tr("Please enter the printer's network hostname or IP address."))
  16.             self.hintTextLabel.setText(self._SetupManualFind__tr('<i>(IPv4 address "a.b.c.d" or "hostname".)</i>'))
  17.             self.findTextLabel.setText(self._SetupManualFind__tr('Hostname or IP Address:'))
  18.         elif self.bus == 'usb':
  19.             self.findHeadingText.setText(self._SetupManualFind__tr('Please enter the USB ID for the printer.'))
  20.             self.hintTextLabel.setText(self._SetupManualFind__tr('<i>("xxx:yyy" where xxx is the USB bus ID and yyy is the USB device ID. The \':\' and all leading zeroes must be present. Use \'lsusb\' to determine this information.)</i>'))
  21.             self.findTextLabel.setText(self._SetupManualFind__tr('USB ID:'))
  22.             self.findLineEdit.setInputMask('000:000;0')
  23.         elif self.bus == 'par':
  24.             self.findHeadingText.setText(self._SetupManualFind__tr('Please enter the filesystem device node for the printer.'))
  25.             self.hintTextLabel.setText(self._SetupManualFind__tr(' <i>("/dev/parportX", X=0,1,2,...)</i>'))
  26.             self.findTextLabel.setText(self._SetupManualFind__tr('Device Node:'))
  27.         
  28.  
  29.     
  30.     def findLineEdit_textChanged(self, a0):
  31.         self.param = str(a0)
  32.         if self.bus == 'usb':
  33.             (bus, dev) = self.param.split(':')
  34.             self.param = ''.join([
  35.                 '0' * (3 - len(bus)),
  36.                 bus,
  37.                 ':',
  38.                 '0' * (3 - len(dev)),
  39.                 dev])
  40.         
  41.  
  42.     
  43.     def __tr(self, s, c = None):
  44.         return qApp.translate('SetupManualFind_base', s, c)
  45.  
  46.  
  47.